#include "ros/ros.h"
#include"server/addint.h"

bool doMsg(server::addint::Request &request,server::addint::Response &response )
{
    int num1=request.num1;
    int num2=request.num2;
    ROS_INFO("the number1 is %d,the number 2is %d",num1,num2);
    int sum=num1+num2;
    response.sum=sum;
    ROS_INFO("the sum is %d",sum);
    return true;
}

int main(int argc,char * argv[])
{
    ros::init(argc,argv,"cuihua");
    ros::NodeHandle nh;
    ros::ServiceServer server=nh.advertiseService("qiuhe",doMsg);
    ros::spin();
    return 0;
}
